package site.wetsion.employ.server.mapper;

import java.math.BigInteger;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import site.wetsion.employ.server.pojo.CampusNews;
import site.wetsion.employ.server.pojo.CampusNewsDetail;

public interface CampusMapper {
	
	/** 插入校园公告及指导*/
	public void insertCampusNews(CampusNews campusNews) throws Exception;
	
	/** 插入校园公告及指导详情*/
	public void insertCampusNewsDetail(CampusNewsDetail campusNewsDetail) throws Exception;

	/** 根据新闻类型分页获取校园公告及指导*/
	public List<CampusNews> getCampusNewsListByTypeAndPage(
			@Param("page") int page, 
			@Param("pageSize") int pageSize,
			@Param("type") int type) throws Exception;
	
	/** 根据新闻类型获取校园公告及指导数量*/
	public int getCampusNewsCountByType(@Param("type") int type) throws Exception;
	
	/** 根据分页获取校园公告及指导*/
	public List<CampusNews> getCampusNewsListByPage(
			@Param("page") int page, 
			@Param("pageSize") int pageSize) throws Exception;
	
	/** 获取校园公告及指导数量*/
	public int getCampusNewsCount() throws Exception;
	
	
	/** 修改校园公告,一般指修改标题、类型*/
	public void updateCampusNews(CampusNews campusNews) throws Exception;
	
	/** 更新公告浏览次数*/
	public void updateCampusNewsSee(BigInteger id) throws Exception;
	
	/** 修改校园公告详情*/
	public void updateCampusNewsDetail(CampusNewsDetail campusNewsDetail) throws Exception;

	public void deleteCampusNewsById(BigInteger id) throws Exception;
	
	public void deleteCampusNewsDetailById(BigInteger id) throws Exception;
	
	public CampusNews getCampusNewsById(BigInteger id) throws Exception;
	
	public CampusNewsDetail getCampusNewsDetailById(BigInteger id) throws Exception;
}
